package com.vipsoft.locker.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.vipsoft.base.entity.wechat.MemberInfo;
import com.vipsoft.locker.mapper.MemberMapper;
import com.vipsoft.locker.service.IMemberService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;


@Service
public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberInfo>  implements IMemberService {

    Logger logger = LoggerFactory.getLogger(this.getClass());

    /**
     * 创建记录
     *
     * @param param
     * @return
     */
    @Override
    public boolean save(MemberInfo param) {
        boolean result = false;
        if (StrUtil.isEmpty(param.getId())) {
            result = super.save(param);
        } else {
            result = super.updateById(param);
        }
        return result;
    }
}
